﻿using System;
using System.Windows.Forms;

namespace WeaponEvalue.Logic
{
    public class GameMonitor
    {
        public GameMonitor()
        {
            LastOccurTime = DateTime.Now;
        }

        public int ID { get; set; }

        public IntPtr F12ButtonPtr { get; set; }

        public IntPtr PointComoboBoxPtr { get; set; }

        public IntPtr ScriptComoboBoxPtr { get; set; }

        public IntPtr MiniGamePtr { get; set; }

        public IntPtr MainWindowPtr { get; set; }

        public string NpcName { get; set; }

        public byte[] NpcNameBytes { get; set; }

        public bool Enabled { get; set; }

        public bool PlayMusic { get; set; }

        public bool AutoOperation { get; set; }

        public int GamePort { get; set; }

        public int GamePacketCount { get; set; }

        public int F12ButtonId { get; set; }

        public DateTime LastOccurTime { get; set; }

        public TextBox LogTextBox { get; set; }

        public ToolStripLabel LogLabel { get; set; }

        public void UpdatePacketCount()
        {
            if (GamePacketCount % 10 == 0) LogLabel.Text = GamePacketCount.ToString();
        }
        
        public void UpdateLocation(int x,int y,int z)
        {
            LogLabel.Text = string.Format("{0},{1},{2}", x, y, z);
        }
    }
}